DATAS SEGMENT
	num db 2 dup('?')
    ;此处输入数据段代码 
	string1 db 'January$'
	string2 db 'February$'
	string3 db 'March$'
	string4 db 'April$'
	string5 db 'May$'
	string6 db 'June$'
	string7 db 'July$'
	string8 db 'August$'
	string9 db 'September$'
	string10 db 'October$'
	string11 db 'November$'
	string12 db 'December$'
	string13 db 'error!$'
	month dw string1,string2,string3,string4,\
        string5,string6,string7,string8,\
        string9,string10,string11,string12
DATAS ENDS

STACKS SEGMENT
    ;此处输入堆栈段代码
STACKS ENDS

CODES SEGMENT
    ASSUME CS:CODES,DS:DATAS,SS:STACKS
; start:
;     MOV AX,DATAS
;     MOV DS,AX
;     mov ah, 9
;     mov dx, 2
;     int 21h
;     mov ax, 4c00h
;     int 21h    
; CODES ENDS
; end start

START:
    MOV AX,DATAS
    MOV DS,AX
    ;此处输入代码段代码
    main	proc	far		;子程序方式定义主程序
		;这里是编写的主程序
		cld
		;lea dx,string1
		;mov ah,10
		;int 21h
		sub ax,ax
		mov dx,offset num
		mov ah,0ah
		int 21h
		
		mov dl,0ah;换行
		mov ah,2
		int 21h
		lea si,num
		mov al,[si+3]
		cmp al,30h
		jae onum
		
		mov al,[si+2];小于10
		sub al,30h
		jmp comp
	onum:
		sub al,30h
		mov bl,al;个位
		mov al,[si+2]
		sub al,30h
		mov bh,10
		mul bh
		add al,bl;
		cmp al,0ch;判断是否大于12
		ja  error
	comp:
		sub al,1
		shl al,1
		mov ah,0
		lea di,month
		add di,ax
		mov dx,[di]
		mov ah,09h
		int 21h
        lea ax, string1
		MOV AH,4CH
    	INT 21H
	error:
		mov dx,offset string13
		mov ah,09h
		int 21h
    	MOV AH,4CH
    	INT 21H
    main endp
CODES ENDS
    END START